<template>
  <div class="region">
    <template v-for="(item,index) in btn">
      <el-button
        type="primary"
        :key="index"
        @click="handler(index)"
        v-if="item.isShow"
        style="margin:0px 0px 25px 0"
      >{{item.title}}</el-button>
    </template>
    <a-table
      rowKey="id"
      :columns="tableOption"
      :dataSource="loadData"
      :pagination="pagination"
      :loading="loading"
      @change="handleTableChange"
      :scroll="{ x:1720}"
    >
      <span slot="action">
        <template>
          <a-button type="link" @click="trend(scope.row)">趋势图</a-button>
        </template>
      </span>
    </a-table>
    <a-modal title="趋势图" v-model="dialogVisible" width="65%">
      <TrendChart :dataList="dataList" :dataX="dataX" :dataValue="dataValue" />
    </a-modal>
  </div>
</template>

<script src='./region.js'></script>

<style lang="less">
.region {
  margin: 10px 0px;
}
</style>